package com.solidumgame.ninja.ingredient.types
{
	import com.pblabs.box2D.PolygonCollisionShape;
	
	import flash.geom.Point;
	
	public class Carrot implements IngredientType
	{
		
		
		public function Carrot()
		{
		}
		
		public function isValid():Boolean
		{
			return true;
		}
		
		public function getSize():Point
		{
			return new Point(100,20);
		}
		
		public function getShape():Array
		{
			var ratioX:Number = 50;
			var ratioY:Number = 10;
			
			var carrotBody:PolygonCollisionShape = new PolygonCollisionShape();

			carrotBody.vertices =  [new Point(-39/ratioX, -10/ratioY),new Point(50/ratioX, 0/ratioY),new Point(-39/ratioX, 10/ratioY)];
			carrotBody.friction = 1;
			carrotBody.density = 1;
			
			var collisionShapes:Array = new Array();

			collisionShapes.push(carrotBody);
			
			return collisionShapes;
		}
		
		public function getImage():String{
			return "../assets/Carrot.png";
		}
		
	}
}